#ifndef __UTILS_H__
#define __UTILS_H__


#include "common.h"






int isAvaliableIpAddress(char * ipAddr);
int isBigThanZero(int x, int y);
void setfdNoBlock(int fd);
int setMaxFdSize(int maxconn);
int checkIsNotRootUser();
int strCaseCmp(const struct dynString *string, const char *command);
char * httpSkip(char *start, char *end, const char *delims, struct dynString *value);


#define try_lock(lock)  (*(lock)==0 && __sync_bool_compare_and_swap(lock, 0, 1))
#define unlock(lock)    *(lock)=0
#define to64(x)  strtoll(x, NULL, 10)
#define ARRAY_SIZE(array)  (sizeof(array)/sizeof(array[0]))



















#endif  
